09. Aggregations

Aggregations

arst

This video shows the results of a count aggregation on the animals table. It's a count aggregation, grouping the values in the table using the species column. In other words, it's counting the number of rows that have the same value in that column.

Here's the table we start with:

name string species string birthdate date
Max gorilla 2001-04-13
Sue gorilla 1998-06-12
Max moose 2012-02-20
Alison llama 1997-11-24
George gorilla 2011-01-09
Spot iguana 2010-07-23
Ratu orangutan 1989-09-15
Eli llama 2002-02-22

And here's the result of the aggregation:

species string count integer
gorilla 3
moose 1
llama 2
iguana 1
orangutan 1